﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Bll
{
    public class Notes
    {
        /// <summary>
        /// 查询声明列表
        /// </summary>
        /// <returns></returns>
        public static DataTable MULTIPLE(string strCon)
        {
            return Dal.Notes.MULTIPLE(strCon);
        }

        public static DataTable Single(string strCon, int pkid)
        {
            return Dal.Notes.Single(strCon, pkid);
        }

        public static DataTable Single(string strCon, string urlname)
        {
            return Dal.Notes.Single(strCon, urlname);
        }

        public static int Insert(string strCon, 
                string txbNotesTitle,
                string txbNotesContent,
                string txbKeywords,
                string txbDescription,
                int txbSortOrder,
                int txbIsDisplay,
                int txbIsFoot,
                string txbUrlName)
        {
            return Dal.Notes.Insert(
                    strCon,
                    txbNotesTitle,
                    txbNotesContent,
                    txbKeywords,
                    txbDescription,
                    txbSortOrder,
                    txbIsDisplay,
                    txbIsFoot,
                    txbUrlName
            );
        }

        public static int Update(string strCon,
                string txbNotesTitle,
                string txbNotesContent,
                string txbKeywords,
                string txbDescription,
                int txbSortOrder,
                int txbIsDisplay,
                int txbIsFoot,
                string txbUrlName,
                int txbPKID)
        {
            return Dal.Notes.Update(
                    strCon,
                    txbNotesTitle,
                    txbNotesContent,
                    txbKeywords,
                    txbDescription,
                    txbSortOrder,
                    txbIsDisplay,
                    txbIsFoot,
                    txbUrlName,
                    txbPKID
            );
        }

        //public static int UpdateField(string strCon, int pkid, string fieldName, int fieldValue)
        //{
        //    return Dal.Notes.UpdateField(pkid, fieldName, fieldValue);
        //}

        public static int Delete(string strCon, int pkid)
        {
            return Dal.Notes.Delete(strCon, pkid);
        }

        public static DataTable SearchSigle(string strCon, string whereStr)
        {
            return Dal.Notes.SearchSigle(strCon, whereStr);
        }
    }
}
